package ochart.serialization.json.oChart
{
	import ochart.core.PieChart;
	import ochart.core.XYChart;
	import ochart.elements.axes.RightYAxis;
	import ochart.elements.axes.Tick;
	import ochart.elements.axes.XAxis;
	import ochart.elements.axes.YAxis;
	import ochart.elements.background.Background;
	import ochart.elements.bars.Bar;
	import ochart.elements.labels.DataTip;
	import ochart.elements.labels.Label;
	import ochart.elements.labels.Title;
	import ochart.serialization.ISerializeFactory;
	import ochart.serialization.ISerialzer;
	import ochart.serialization.json.oChart.charts.PieChartSerializer;
	import ochart.serialization.json.oChart.charts.XYChartSerializer;
	import ochart.serialization.json.oChart.elements.axes.RightYAxisSerializer;
	import ochart.serialization.json.oChart.elements.axes.TickSerializer;
	import ochart.serialization.json.oChart.elements.axes.XAxisSerializer;
	import ochart.serialization.json.oChart.elements.axes.YAxisSerializer;
	import ochart.serialization.json.oChart.elements.background.BackgroundSerializer;
	import ochart.serialization.json.oChart.elements.bars.BarSerializer;
	import ochart.serialization.json.oChart.elements.labels.DataTipSerializer;
	import ochart.serialization.json.oChart.elements.labels.LabelSerializer;
	import ochart.serialization.json.oChart.elements.labels.TitleSerializer;
	
	public class JSONSerializeFactory implements ISerializeFactory
	{		
		public function JSONSerializeFactory()
		{
		}
		
		public function create(alias:String):ISerialzer
		{
			switch(alias)
			{
				case XYChart.ALIAS:
					return new XYChartSerializer();
				case PieChart.ALIAS:
					return new PieChartSerializer();
					
				case Bar.ALIAS:
					return new BarSerializer();
				
				case Background.ALIAS:
					return new BackgroundSerializer();
				case DataTip.ALIAS:
					return new DataTipSerializer();
				case Label.ALIAS:
					return new LabelSerializer();
				case Tick.ALIAS:
					return new TickSerializer();
				case Title.ALIAS:
					return new TitleSerializer();
					
				case XAxis.ALIAS:
					return new XAxisSerializer();
				case YAxis.ALIAS:
					return new YAxisSerializer();
				case RightYAxis.ALIAS:
					return new RightYAxisSerializer();
			}
			return null;
		}
	}
}